import { defineStore } from "pinia";
import { ref, computed } from "vue";

export const useLog = defineStore(
  "log",
  () => {
    const token = ref("");

    const reverseToken = computed(() => {
      return token.value.split("").reverse().join("");
    });

    const changeToken = () => {
      token.value = "token-token";
    };

    return {
      token,
      reverseToken,
      changeToken,
    };
  },
  {
    persist: true,
  }
);
